//
//  PostWorkOrderSuccessViewController.m
//  NewPro
//
//  Created by RYX on 2018/11/24.
//  Copyright © 2018年 何荧红. All rights reserved.
//

#import "PostWorkOrderSuccessViewController.h"
#import "WorkOrderViewController.h"
#import "PosRegistViewController.h"
@interface PostWorkOrderSuccessViewController ()

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *topMarign;

@end

@implementation PostWorkOrderSuccessViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.topMarign.constant =  85;
    
    [self setNavBarWithTitle:@"资料提交"];
}

- (void)back{
    
    [self goBack];
}
- (IBAction)onSureBtn:(UIButton *)sender {
    
    [self goBack];
    
}

- (void)goBack{
    
    UINavigationController *nav = [AppDelegate sharedAppDelegate].navigationViewController;
    
    NSMutableArray *viewControllers = [[NSMutableArray alloc]init];
    
    for (UIViewController *vc in [nav viewControllers]) {
        
        [viewControllers addObject:vc];
        
        if ([vc isKindOfClass:[WorkOrderViewController class]] || [vc isKindOfClass:[PosRegistViewController class]]) {
            
            break;
        }
    }
    
    [nav setViewControllers:viewControllers animated:YES];
    
}
@end
